﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CarLoanSystem.Entity;

namespace CarLoanSystem
{ 
    public partial class frmMainLoanHeadEmployee : Form
    {
        private static EmployeeItem empItem;
        public frmMainLoanHeadEmployee()
        {
            InitializeComponent();
            //this.Hide();
        }

        public frmMainLoanHeadEmployee(EmployeeItem item)
        {
            InitializeComponent();
            empItem = item;
            this.panelLoan.Hide();
            this.panelReport.Hide();
            this.panelMain.Show();
        }

        private void btnConfrem_Click(object sender, EventArgs e)
        {
            this.panelLoan.setEmployee(empItem);
            this.panelLoan.setMode("approve");
            this.panelLoan.Show();
            this.panelLoan.refreshGridview();
            this.panelReport.Hide();
            this.panelMain.Hide();
        }

        private void btnReport_Click(object sender, EventArgs e)
        {
            this.panelLoan.Hide();
            this.panelReport.InitBtn();
            this.panelReport.InitPanelReport();
            this.panelReport.Show();
            this.panelMain.Hide();
        }

        private void btnMain_Click(object sender, EventArgs e)
        {
            this.panelLoan.Hide();
            this.panelReport.Hide();
            this.panelMain.Show();
        }

        private void btnAlertsMessage_Click(object sender, EventArgs e)
        {
            this.panelLoan.Hide();
            this.panelReport.Hide();
            this.panelMain.Hide();
            this.panelAlertsMessage.setEmployee(empItem);
            this.panelAlertsMessage.Show();
        }
     }
}
